package hu.jonas.junitmax;

import org.eclipse.jdt.junit.model.ITestCaseElement;
import org.eclipse.jdt.junit.model.ITestElement;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;

public class PassedTestFilter extends ViewerFilter {

	@Override
	public boolean select(Viewer viewer, Object parentElement, Object element) {
		ITestCaseElement t = (ITestCaseElement) element;
		return t.getTestResult(false) == ITestElement.Result.OK;
	}

}
